<?php

class Users extends Model {
    var $name = 'Users';
    
    function username_sanitize($username) {
        return sanitize_user($username);
    }

    function nickname_sanitize($nickname) {
        return al_specialchars($nickname);
    }

    function email_sanitize($email) {
        return preg_replace('/[^a-z0-9+_.@-]/i', '', $email);
    }

    function url_sanitize($url) {
        $url = stripslashes($url);
        return clean_url($url);
    }

    function tell_sanitize($tell) {
        return preg_replace("/^((\(\d{3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}$/",'', $tell);
    }

    function aim_sanitize($aim) {
        return al_specialchars($aim);
    }

    function yim_sanitize($yim) {
        return al_specialchars($yim);
    }

    function jabber_sanitize($jabber) {
        return al_specialchars($jabber);
    }
}
?>
